<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{include/head::head}"></head>
<body>
<div th:replace="~{include/head::topbar}"></div>
<div class="container">
    <div style="margin-bottom: 15px;">
        <p th:if="${#request.getParameter('keyword') != '' && #request.getParameter('keyword') != null }">
            以下是：<font color="red" th:text="${#request.getParameter('keyword')}"></font> 的搜索结果
        </p>
        <a th:if="${#request.getParameter('keyword') == ''}" th:href="@{/message/send}" class="btn btn-info">发布新的留言</a>
    </div>
    <table class="table table-bordered table-striped">
        <tr>
            <td>ID</td>
            <td>内容</td>
            <td>发布人</td>
            <td>发布时间</td>
        </tr>
        <tr th:each="item:${list}">
            <td th:text="${item.id}"></td>
            <td><a th:href="@{'/message/' + ${item.id}}" th:text="${item.content}"></a></td>
            <td th:text="${item.username}"></td>
            <td th:text="${item.createTime}"></td>
        </tr>
    </table>
</div>
</body>
</html>